package Time;


import java.text.ParseException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;

public class Time {
    public static void main(String[] args) throws ParseException {

        // 返回数组内容
        int [] arr = {1, 2, 3, 4};
        System.out.println(Arrays.toString(arr)); // [1, 2, 3, 4]

        // 拷贝数组，左闭右开
        int [] arr2 = Arrays.copyOfRange(arr, 1, 3);
        System.out.println(Arrays.toString(arr2));  // [2, 3]

        // 拷贝数组，新数组定长
        int [] arr3 = Arrays.copyOf(arr, 10);
        System.out.println(Arrays.toString(arr3)); // [1, 2, 3, 4, 0, 0, 0, 0, 0, 0]

        //
    }
}
